package tagsample;

import java.io.IOException;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.TagSupport;

public class Classic2 extends TagSupport{
	
	JspWriter out;
	
	
	public int doStartTag() throws JspException{
	
		out = pageContext.getOut();
	
	try{
		out.println("classic tag in doStartTag()");
	}catch(IOException ex){
		throw new JspException("IOException-" +ex.toString());
	
	}
	return SKIP_BODY;
	}

	
	public int doEndTag() {
		
		out = pageContext.getOut();
		try{
			out.println("classic tag in doEndTag()");
		}catch(IOException ex){
			try {
				throw new JspException("IOException-" +ex.toString());
			} catch (JspException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		
		}		
				return EVAL_PAGE;
	}
}
